Copyright: Helpfile Generated by VB HelpWriter!


Time Sheet

This form displays information on the time spent working on the project shown on the currently active project window.

  Command Buttons

      Refresh

Requeries the database for times for this project, checks, totals and reloads information into form.

      Close

Closes the Time Sheet.

      Total Project Time Hours

This text box shows the total time spent working on the current project.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Project Manager
Project Manager MDI Parent Form

---Menus---

File

  New Project Window

       Selecting New Project Window will open a new MDI  Child form which will display the first record in your Project database.  If there are none, this form will be blank, and you may add projects by using the menus which will appear with the Project Manager MDI Child form.

  Close Project Window

       Closes the active open Project Manager MDI Child form.

  Exit

       Exits the program

Database

  Compact Database

       Compacts the "VBPROJS.MDB" database.  This makes the database take up the minimum amount of disk space and speeds access to project information.  It should be done after any significant changes are made to the projects in the database and they have been updated.  Always select the "Backup Database" option before you Compact the database.  While I have never experienced an error in a compact operation, anything is possible and you should not risk your data.

  Backup Database

Will load an Input box to accept a path to backup the "VBPROJS.MDB" file to and copy it to that path.

Help

  Show Help

Loads this help File.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Options

The Options Form allows the user to choose the type of error handling code  the user wishes written to the currently selected project.

---Menus---

      File

         Close

Closes the Options form, does not record changes, if any.

      Options

         Error

Allows the user to set the type of error handling code for the program to write.  See descriptions under the labels below for information on the two types of code the program can write to project files.  The default is for Message boxes. When changed, the program will write the type of error handler desired to the "PROJMGR.INI" file in your Windows directory, and use that information for all error handler code until you change it again.  Selecting this menu option will display the following controls:

         Use Message Box Radio Button

Select this radio button to enable the MessageBox  error handler.  The program will write an error handler in each procedure which wil trap errors, display a message box of the description and number of the error, and then return control to the user without crashing the program.  This is the most basic error handler which will keep your program from crashing unexpectedly on the user, but cannot anticipate types of errors which may occur and take appropriate action to recover from them.

         Use Log Error Radio Button

Select this radio button to enable the Log Error error handler .  This will add a function in your project to write an error log text file in your project directory. The text file will record the error that occurred, the error number, the function that caused it, and the time it occurred.  It will provide the user a message box advising what the error was, then exit and return control to the user without the application crashing.  Again, this error code will keep your app from crashing, but is not able to anticipate specific errors and take appropriate action to recover from them.

A sub called "LogError" does the actual writing of the error log text file.  When the error handler writing code is running it will look for a Sub with the name of "LogError".  If you have such a Sub or Function in your project it will prevent the code from writing the log error function. If it does not find the "LogError" Sub, it will add a file to your project called "ERROR.BAS".  This file will contain a declaration of a Global Variable "Global Procname as string".  This variable is added to each of your functions, and is passed as an argument to LogError.   It will add this module to the .MAK file for your project.

You can open the project, decide whether you wish to keep the ERROR.BAS  file, or add its contents to another .BAS file in your project.  If you have only one form in the project, you can add the contents of ERROR.BAS to the form module, and declare the variable "Dim Procname as string" in the declarations section of the form.  If you do wish to remove "ERROR.BAS" from your project, make sure you add  the Global variable to your project in a .BAS file as "Global Procname as string", and copy and paste the code for Sub LogError into a module.  You can then remove the "ERROR.BAS" file from your project.

If the presence of a Function or Sub in your project which you had already called LogError caused it to not write the function, select "Edit|Copy" from this Helpfile menu to copy the following code and paste it into your project.  Don't forget to add the variable "Procname as string" as a Global variable as well.

Sub LogError (aNum as integer, Procname as string)

    Dim FileNum as Integer

    FileNum = FreeFile

    MsgBox Error(aNum) &" "& aNum, 16,"Test"

    Open App.Path & "\errlog.txt" For Append as FileNum

    Write #FileNum, Now, Error(aNum), aNum, Procname

    Close #FileNum

End Sub

  Command Buttons

     Cancel

Unloads the Options form without making any changes.

     OK

Unloads the Options form and saves changes, if any.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Error Handler Information

      OK

Closes the Error Handler Information form.

      Error Handler Commented Out

This list box shows procedures in which the error handler exists but has been commented out.

      Error Handler Not Added

This list box shows procedures in which error handling code  was not added at the request of the user.

      Error Handler Added

This list box shows the procedures to which error handling code was added at the request of the user.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Unused
Unused Code Form

This form displays information on unused code in your project.  It is loaded after the selection of a "Check Unused" menu item under the "Utilities" menu of the project window form.  It will show the appropriate information, depending on whether the user wanted to check for unused Constants, Variables or Procedures.

      OK Button

Closes the form.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Project Manager Overview

Project Manager for VB 3.0 Windows is a multi purpose tool to aid in managing VB projects.

To operate correctly, the program requires that you save your projects as Text.  This is done by selecting the Options|Environment  menu items, and setting the default save as to Text.  There are numerous other advantages to saving your projects as text.

Your forms must be saved with the default .FRM extension, and modules with the default .BAS extension for the program to correctly read them. The form files must be formatted by Visual Basic.  If you use any text editor which writes the files differently than VB, this program may not be able to correctly read them.  Prior to adding any project, you should load it into VB, run it under VB, then save the project before exiting.  This should ensure correct formatting of the files.

To allow the program to properly locate variables, you must use the Option Explicit  statement in your projects.  It is considered good programming practice to do this, as it eliminates problems due to misspelling, etc., in code.  You can ensure this is added to all your modues by setting it as a default in the Options|Environment menu item of VB.

The database which stores the information parsed from the project is an Access 2.0  database.  Access 2.0 was used to take advantage of the advanced options offered by Access 2.0, particularly with respect to speed of queries and table level validation.  You will need to install the Access 2.0 compatability layer to use this program. This layer is available in the VB libraries, as well as the Microsoft libraries on CompuServe, and installs itself without problems.  It gives seamless access to Access 2.0 databases, as well as Access 1.x databases.

 The database was created on a secure Access 2.0 system, and thus needs its own System.MDA  file which is supplied. If you have a copy of  Access 2.0 and manage to open the database file,  do not make any changes to the structure of the database, as that will cause the program to fail or store erroneous information on your projects.  For safety's sake, if you wish to view the database, check "Read Only" in the File|Open Dialog of Access when trying to open the database.  There is nothing of interest in the .MDB, it only contains tables to hold the data, set up in a normalized schema.  All other Database access is generated on the fly by the program.

Project Manager is an MDI  application, and it allows multiple projects to be tracked, viewed and manipulated at the same time.  VB only allows one instance to be running at a time, but you can still work on multiple projects concurrently in Project Manager.

Instead of loading VB, then loading a project, use Project Manager to do this.  By loading Project Manager, then finding the project you wish to work on in your database, you can then load VB with your project loaded, and record the time you start work on your project.

When first loaded, Project Manager will load the MDI parent form, then a Project Window form which will be blank as you will have not added any projects to the database yet.  After you have projects in the database and projects are about to be added or updated, it is strongly recommended you backup the database, then compact it using the menu items on the MDI Parent form first.  To add a project, select "File|Add Project" or use "Ctrl + A" as a shortcut.   Right clicking on a blank area of this form will bring up the "File" Menu.

 When adding new projects, you will get a Windows Common Dialog box which will allow you to select the .MAK file of the project you wish to add.  After selecting it, the program will confirm you wish to add this project, and when you confirm, it will read the project files and add the various pieces of information to the database.

Each project is parsed to extract variables, constants, menus, controls, procedures, and external function declarations (such as Windows API function declarations).  These are stored in the database "VBPROJS.MDB"  which is placed in the directory holding all the program and database files.

The Project Window form has a data control at the bottom which allows you to browse through the database of your projects.  This form displays .VBX's and project files which are in the project .MAK file. On this form you may enter a title for your project, and a backup path in the text box provided. The backup path is used to backup all project files to your specified path in one action.  This form is not resizable.

The various menu items are described under their appropriate forms' help file topics. When selected, various subforms will display information parsed from the program.  There is virtually no limit (except available memory) to the number of MDI child windows displaying projects and information about projects that can be open at a time, though excessive use of this feature will clutter the screen to the point of making it almost unuseable.

Project Manager will write error handler code for your projects.  The program will write either a simple message box error trapper, or it will write a more sophisticated Error Logging handler, which will write a log file of the errors that occur when your project is running.  This is invaluable in debugging projects running on diverse systems.  You can select which style of error handler your prefer by selecting the "Utilities|Set Options" menu items on the main form menu bar.  Check your Error Handler option before you run the utility on your project, to ensure you have selected the right error handling code  type.

Project Manager will load VB with your project loaded, and record the time which you start work on it.  It will also unload VB and record the time you stop working on your project, and keep a running total of time spent working on the project.  This is accomplished by the "Times" menu items on the main form menu.  Left clicking on a blank area of the Project Window form will bring up the "Times" menu as well.

The "Utilities" menu contains three menu items to locate dead code.  These menu items will search your project for unused declared variables, unused constants, and unused procedures.  The results of these searches will be displayed on a form which will allow you to check for them in your code using VB's search functions.

For more information on each form and menu item, view the help topic for these items.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Contents

Installation

Project Manager Overview

Project Manager Main Form

Project Window

Options Form

Time Sheet

Project Contents Information Form

Error Handler Information Form

Unused Code Information Form

Registration Information

Upcoming Program Enhancements

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Register

Project Manager V2.0 for VB 3.0 Windows is written by:

              Bud Street,

A.F. Street Consulting,

R.R.#1,

Peterborough, ON, Canada

K9J 6X2

Phone 705-292-6621

CIS 72152,333

Register the program by sending $25.00 U.S. funds, or $33.00 Canadian funds to the author at the above address, cheque or money order made payable to Bud Street.

Registration will entitle you to a free upgrade (except for the cost of disk and shipping) for the next release of the product.  Read the Upcoming Enhancements for information on what the next release will do.  Be aware that there will be a major price increase for the next version, you can avoid this by registering this version now.

If you evaluate the program and do not like it, or have problems with it, please take a moment to send me an E-Mail telling me why you did not like it, or what problems you had with it.  If it generated an error log file, I would appreciate a copy of the text of that file as well.  If there is something you would like to see in the program, please advise me.  This information will assist me in further developing the program and making it more useful to VB programmers.

Liability Disclaimer

This program has been tested on various systems and has worked without problem.  However,  as usual, the author assumes no liability for whatever this program may do on your system, and you use it at your own risk.  Due to the myriad of possible system configurations, programming styles, third party tools, etc.,  it is suggested that you verify any information given to you by the program using VB's search functions before you delete any code.  While it has been 100% accurate on my projects in picking out unused code and reporting information, verify it before you act on it.  This program currently does more than many similar programs which sell for three or four times the price.  Future enhancements will expand more on its capabilities.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Upcoming Enhancements

Time Sheet

The time sheet will be enhanced to allow the user to enter a task description with each time period spent working on the project.  Buttons will be provided to end the time when the task changes, and start a new time for a new task, without having to unload and reload the project into VB.  A report will be created to display and print this information.  This will allow users to track time spent on each aspect of project development.

Reports for Project Contents

The reporting format for project contents will be changed to a better looking, more readable interface, and the capability to print reports on project contents will be included.

Drag and Drop Between Projects

It will be possible to move code between project modules (even between different projects) using drag and drop.  This will enable you to move standard, re-usable code from library modules stored in the Project Manager as a project to other current projects, rather than having to do the AddFile, then delete the code you don't want, or Copy and Paste methods.

Support for DefType Statements

The program does not currently recognize DefType statements in modules, thus any variable that is not specifically assigned a data type is recognized by the program as a variant.  This will be corrected in the next release of the program.

Support for other Filename Extensions

The program currently can only properly recognize the extension .FRM for forms and .BAS for modules.  The capability to allow the user to specify different extensions, such as .GLB for modules will be added.  Form files will still require the .FRM extension.

Finding Unused external declared functions

The capability to check to see that external function calls are actually used in the program code will be added in the next release.

Toolbar with Tooltips

A Toolbar with bitmapped button and MS style Tooltips for one click access to most functions will be added to the next release.

These enhancements will be enabled by a complete re-write of the program using VB Pro3.0.  This will also improve some aspects of program performance as it will eliminate graphics methods and speed data access through use of data objects instead of data controls.

Registration will assist further enhancements by the acquisition of better third party reporting, printing and interface tools.  This is the cheapest, most useful project manager application around.  It has proven invaluable to me, particularly regarding finding unused code and adding error trapping to projects.  Your support will enable me to continue to enhance the usability and improve the interface of the program.

If there are additions to the program which you feel would be useful, please advise me by e-mail.  See the Register topic for my address.

Helpfile Information

This helpfile was created using VB HelpWriter Lite edition V1.6.2., which was downloaded from the MSBasic Library on CompuServe.  This is an excellent tool for making helpfiles and is well worth evaluating.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Installation

Project Manager for VB 3.0 Windows is written using VB 3.0 Standard.  It uses only standard edition VBX's and Data controls for data access, the only external VBX is Scott Stubb's MBAR.VBX, which forms the progress meter on the main MDI  Parent form.  The database file "VBPROJS.MDB" was created on a secure Access 2.0  system and thus requires its own "SYSTEM.MDA" file, which is supplied. You will not be able to access the database without this file.  To avoid conflicts with any other secure MDB's on your system, put all supplied files in the same directory on your hard drive.  The name of it does not matter, as the application uses "App.Path" to find the "SYSTEM.MDA" file and the database file.   The program sends the correct User Name and Password in the "SetDefaultWorkspace" statement on program load to give access to the information in the database, so no Log On form is needed.

Install Project Manager as follows:

1./ Make a directory on your hard drive to store Project Manager in.

2./ Place the Project Manager executable "PROJMGR2.EXE", this helpfile, the file "SYSTEM.MDA" and the database file "VBPROJS.MDB" in the directory you created for it.

3./ Place the file "MBAR.VBX" in your Windows/System directory

4./ Ensure that you have the files "CMDIALOG.VBX"  and "GRID.VBX" supplied with VB in your Windows/System directory.  The program also references code in the file "MSAFINX.DLL"  which is also a VB and Access file and should already be in your Windows\System directory.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Information Form

This form displays the information extracted from the database at the request of the user.  It is shown after the selection of an item under the "View" menu of the project window form.    The items displayed in the form will correspond to the menu selection made by the user.

The program will resize the grid automatically as you resize the form.  It will make all columns of the grid equal in size when you resize the form.  You can increase or decrease the width of columns in the normal spreadsheet fashion.  This will allow you to see larger string easier, and hide information which is not important to you, such as index numbers of the various items.

      OK

Command button which closes the form.

---Menus---

    File

     Close

Closes the currently active information form.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Project Manager Project Window

The Project Manager Project Window displays information on each project added to your database, or allows you to begin adding projects to your database.  It displays information on the project files, backup path, etc.  The menus for this form allow you to access the features of the program, such as writing error handlers, checking for dead code, viewing the contents of your project, etc.  Multiple project windows can be open at any time, each one can display a separate project.

Note:

The functionality of the "File" and "Times" menus are duplicated by clicking on a blank part of the Project Window form with the mouse.  The mouse buttons will pop up these two menus, which saves time moving to the normal menu bar area.

 ---Menus---

     File

         New Project Window

Loads a new Project Window with the first project in your database of projects loaded.

         -

         Add Project

Opens a Windows Common Dialog box which allows you to select a project .MAK file to add to your project database.  The function will ask you to confirm your selection, and after confirmation it will parse the project files, and add the information from the project files to your database. While this code will not lock your system up, it is suggested you do not switch to other tasks while this function is running.  The length of time it takes depends on the size of your project, and what it contains.  A meter bar will keep you informed of the progress of the function.

         Update Project

This function will ask confirmation that you wish to Update this project, and after confirmation, it will read your project again to check for changes and add them to the database.  The same cautions as above apply for this function.

         Delete Project

Removes a project and all its information, including start and stop times from the database.  It will ask for confirmation before running, but after confirmation, the project is completely removed.  The only way to recover this information is to add the project to the database again.  The times, however, are permanently removed, so use this selection with caution.

         -

         Backup Project

Backs up your project files to a path which you enter in the appropriate box on the main Project Window form.  Type in a path with drive and directory to back up to.  If the directory does not exist, the program will offer to create it for you.

This function will ask you if you wish to back all the files in the project directory, or only the files listed in the .MAK file.  It is suggested you keep all your project files, including help files, in one directory.  The program will back up all files in this directory if you click "Yes", or just the files in the .MAK file if you click "No."  This is helpful when you wish to backup help files and all project files, or saves time when only the project files have changed.

         -

         Close Project Window

Closes the currently active Project Window.  This does not exit the program, and if you have multiple Project Windows open, it only closes the active one.

         -

         Exit

Closes all windows and exits the program entirely.  Note that if you have used Project Manager to start a project and record the start time, this will cause it to leave an incomplete record in the database.  The next time you load that project, it will advise you there is an incomplete record in the database for that project.  You may not want the program running at certain times, but may wish to continue working on your project, this gives you the flexibility to do so if necessary.

      View

All "View" menu items will load an Information form with a grid on it.  Multiple instances of this form can be opened for the currently active project.  The form will resize the grid automatically if you resize the form, and the various column widths can be adjusted in normal grid/spreadsheet fashion.  All menu items run queries on the database, and a momentary delay will occur as the information is extracted and loaded into the grid.

         Constants

Loads the information form which contains information on your project constants.  It will tell you the file the constant is in, the name of the constant, the scope, value, and procedure (if any) it is declared in.

         Controls

Loads the information form which contains information on controls in your projects.  You will be advised what file the control is in, the name of the control, and the type of control it is.

         Declares

Loads the information form which contains information on external functions declared in your project.  You will be advised the name of the Function and the origin of it, and the file it is declared in.

         Menus

Loads the information form with information on menu items contained in the project.  It will tell you the file the menu is contained in, the menu name and caption, submenu name and caption, and the shortcut key for that menu item.

         Procedures

Loads the information form displaying Procedures in your project.  It will advise you the file name the procedure is in, the Procedure name, the arguments the procedure takes, its return value and whether it is a Sub or a Function.  Subs are displayed as "0", Functions as "-1".

         Variables

Loads the information form with Variables declared in your project.  It will advise you the name of the variable, the procedure it is declared in, the file name it is declared in, the scope and the data type of the variable.

      Times

         Open Project(Record Start Time)

Opens VB with the current project loaded, and records the time that work starts on the project.

         Close Project(Record Stop Time)

Closes VB, and records the stop time in the database.

         -

         View Times

Loads the time form with the start and stop times recorded for the current project.  Also displays a total of times.  This function checks times as it loads and may take a brief moment to extract, verify and load the information into the form.

      Utilities

         Set Options

Loads the Options form.  See Options Form for help on functions that form provides.

         -

         Write Error Handlers

Many developers prefer to add error handling code  last in a project.  If error code is added during the developement phase of running the project under VB, errors will be trapped and you will not be able to discover the exact line in procedures that is causing the error.  Thus, error handlers are often added last.  This can be very tedious work, and is the reason why this function was built into Project Manager.

This function will iterate through each file in your project.  It will ask you to confirm if you wish error handlers written for that file.  If confirmed, it will go to each procedure in that file, and check for an error handler or a commented out error handler.   If none is found, it will ask you if you want an error handler written in that procedure.  On confirmation, it will write the error handler.  It will continue through all procedures in all files of the project.

At the conclusion of the function, it will ask if you wish to see an Error Handler Information report and on confirmation, will display a report showing the files checked, and what procedures had error code it them, procedures with error code commented out, and procedures it wrote error code into.

         -

         Check Unused Procedures

 	This function will iterate through all the files in your project.  It will check each procedure to see that it is used in the project.  At the end of the procedure, it will advise you via an "Unused Form" what procedures do not appear to be used in your project.  Before deleting them, use VB's search function to ensure that the procedure is not in fact called.   This function may take some time while running, and a meter bar will inform you of its progress as it occurs.

         Check Unused Variables

This function will check all files for declared variables that are not used.  It will advise you in a form when finished what variables do not appear to be used.  Use VB's search function to ensure that the variables are not in fact used before deleting them.

         Check Unused Constants

This function checks all files for constants and determines which are not used.  The cautions above regarding deleting apply here as well.

      Window

Standard window arrangements commands

         Cascade

         Tile Horizontal

         Tile Vertical

         Arrange Icons

      Help

         Show Help

Loads this help file.

         -

         About

Loads a small about label on the currently active Project Window form.  Double click the label to remove it from the form.

To do maintenance on your database file, such as backing it up or compacting, close all open windows in the application and use the "Database" menu items on the main MDI  Parent form.

Project Manager V2.0 - More Functionality Per Buck Than Any Other Program! - Helpfile generated by VB HelpWriter.


Glossary

A

Access 2.0

Access 2.0 compatability layer

E

error handling code

ERROR.BAS

L

Log Error error handler

M

MDI

MessageBox

O

Option Explicit

Options|Environment

S

secure databases

System.MDA


MDI

Multiple Document Interface


secure databases

Databases which have been secured using the security features of Access.  Users will require a User name and Password to access any database running on a system which has a secure system.mda on it.


Options|Environment

Menu Item for VB 3.0 which allows you to set Environment Options for all projects


System.MDA

File used by Access to establish various database parameters, including security


Option Explicit

Statement which forces variables to be declared in all project modules. Considered good practice to use this statement at all times to guard against unintentionally used variables which can cause program bugs that are very difficult to trace.


error handling code

Code which traps runtime errors and enables the application to recover and continue execution.


Access 2.0 compatability layer

Files which allow VB 3.0 to use the Access 2.0 JET database engine.  Available on CompuServe, or with various Microsoft products, such as the Office Developer's Kit.


Access 2.0

Second release of Microsoft's "End User" Database.


MessageBox

Error handler which simply gives the user a Message Box describing the error which occurred and the number of the error.


Log Error error handler

Error handler which writes a log file of the details of the error, as well as displaying a message box advising the user what the error was.  Useful in debugging program errors on different systems.


ERROR.BAS

File added to your project which contains the Sub LogError and a declaration of a Global variable "Procname as String".  Used to write the error log file when that option is selected for error handling code.